#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
    //sqrt是求平方根的函数
    float d = 5;                                           //底长
    float h = 7;                                           //金字塔高
    float s = sqrt(h * h + (d / sqrt(2)) * (d / sqrt(2))); //侧面三角形腰长
    float sh = sqrt(s * s - (h / 2) * (h / 2));            //侧面三角形高
    float res = d * sh / 2;
    printf("结果%.3f", res);
    return 0;
}